<template>
    <div>
        <button @click="show">显示/隐藏</button>
        <transition-group 
        appear
        name="animate__animated animate__bounce" 
        enter-active-class="animate__swing"
        leave-active-class="animate__backOutDown"
        >
            <h2 v-show="isShow" key="1">培立优</h2>
            <h2 v-show="!isShow" key="2">家动员</h2>
        </transition-group>        
    </div>
</template>

<script>
import 'animate.css'
export default {
    name:'TestComponent3',
    data(){
        return {
            isShow: true
        };
    },
    methods:{
        show(){
            this.isShow = !this.isShow;
            console.log('Test3',this.isShow)
        }
    }
}
</script>

<style scoped>
h2{
    background-color: peru;
}
</style>